    package com.anguin.mylibrary.entity;

    import java.io.Serializable;
    import java.sql.Timestamp;
    import javax.persistence.Column;
    import javax.persistence.MappedSuperclass;

    @MappedSuperclass
    public class BaseEntity implements Serializable {

        private static final long serialVersionUID = 1L;  // 序列化版本号
        @Column(name = "is_deleted")

        private Boolean isDeleted = false;  // 是否删除
        @Column(name = "created_by")
        private String createdBy;           // 创建人
        @Column(name = "created_at")
        private Timestamp createdAt;        // 创建时间
        @Column(name = "updated_at")
        private Timestamp updatedAt;        // 更新时间

        // Getters and Setters
        public Boolean getIsDeleted() {
            return isDeleted;
        }

        public void setIsDeleted(Boolean isDeleted) {
            this.isDeleted = isDeleted;
        }

        public String getCreatedBy() {
            return createdBy;
        }

        public void setCreatedBy(String createdBy) {
            this.createdBy = createdBy;
        }

        public Timestamp getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(Timestamp createdAt) {
            this.createdAt = createdAt;
        }

        public Timestamp getUpdatedAt() {
            return updatedAt;
        }

        public void setUpdatedAt(Timestamp updatedAt) {
            this.updatedAt = updatedAt;
        }
    }
